package cn.itcast.mr.invertedIndex;

import java.io.IOException;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

public class InvertedIndexReducer extends Reducer<Text, Text, Text, Text> {
	private static Text result = new Text();
	public void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {
		// process values
		String fileList = new String();
		for (Text val : values) {
			fileList += val.toString() + ";";
		}
		result.set(fileList);
		context.write(key, result);
	}
}
